package com.ruoyi.project.infoBaseProjectStatist.mapper;

import com.ruoyi.project.infoBaseProjectStatist.domain.InfoBaseProjectStatist;
import com.ruoyi.project.infobaseproject.domain.TjProjectVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 项目数据统计Mapper接口
 *
 * @author ruoyi
 * @date 2022-03-18
 */
public interface InfoBaseProjectStatistMapper {
    /**
     * 查询项目数据统计
     *
     * @param id 项目数据统计主键
     * @return 项目数据统计
     */
    public InfoBaseProjectStatist selectInfoBaseProjectStatistById(Long id);

    /**
     * 查询项目数据统计列表
     *
     * @param infoBaseProjectStatist 项目数据统计
     * @return 项目数据统计集合
     */
    public List<InfoBaseProjectStatist> selectInfoBaseProjectStatistList(InfoBaseProjectStatist infoBaseProjectStatist);

    /**
     * 新增项目数据统计
     *
     * @param infoBaseProjectStatist 项目数据统计
     * @return 结果
     */
    public int insertInfoBaseProjectStatist(InfoBaseProjectStatist infoBaseProjectStatist);

    /**
     * 修改项目数据统计
     *
     * @param infoBaseProjectStatist 项目数据统计
     * @return 结果
     */
    public int updateInfoBaseProjectStatist(InfoBaseProjectStatist infoBaseProjectStatist);

    /**
     * 删除项目数据统计
     *
     * @param id 项目数据统计主键
     * @return 结果
     */
    public int deleteInfoBaseProjectStatistById(Long id);

    /**
     * 批量删除项目数据统计
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInfoBaseProjectStatistByIds(Long[] ids);

    public int deleteInfoBaseProjectStatistByIdss(Long[] ids);

    List<InfoBaseProjectStatist> selectInfoBaseProjectStatistLists(Long deptId);

    /**
     * 批量删除项目数据统计
     *
     */
    List<Map<String,Object>> selectProjectStatistics(@Param(value = "startTime") String startTime,@Param(value = "lastTime") String lastTime,@Param(value = "projectName") String projectName);

    /**
     * 查询二级项目统计
     */
    List<Map<String,Object>> selectSecondProjectStatistics(Integer parentProjectId);

    List<InfoBaseProjectStatist> selectByid(@Param(value = "iid") Long iid,@Param(value = "startTime") String startTime,@Param(value = "lastTime") String lastTime);

    Long selectInfoBaseProjectStatistByIds(Long id1);


    InfoBaseProjectStatist selectTotal();

    InfoBaseProjectStatist selectInfoBaseProjectStatistListsjs(Long id);

    InfoBaseProjectStatist selectInfoBaseProjectStatists(Long id);

    /**
     * 查询一级，二级项目数量
     * @param deptId
     * @return
     */
    List<TjProjectVo> selectProjectInfo(Long deptId);

    /**
     * 批量新增项目数据统计
     *
     * @param infoProjectStatist 项目数据统计
     * @return 结果
     */
     void batchInsertProjectStatist(@Param(value = "infoProjectStatist") List<InfoBaseProjectStatist> infoProjectStatist);

    /**
     *统计功能（按照区域统计项目信息）
     * @param id
     * @return
     */
    List<Map<String, Object>> selectRegionProject(@Param(value = "id") Long id,@Param(value = "startTime") String startTime,@Param(value = "lastTime") String lastTime);
}
